
package client.dm;

//Esta es la clase para manejar el movimiento de las piezas alrededor del tablero

public class objCellMatriz {
    
    private int[] playerMatrix = new int[14];//trenes abiertos
    private int[][] pieceMatrix = new int[14][6];//9 trenes, fichas de usuario
    
    public void objCellMatrix() {
    }
    
    public void resetMatrix() {
        
        for (int row = 0; row < 9; row++) {
            
            for (int column = 0; column < 6; column++) {
                
                if (row == 0||row == 8) 
                {                    
                    playerMatrix[row] = 1;                    
                }
                pieceMatrix [row][column] = 0;
            }
            
        }        
    }
    
    public int getTrenAb(int row) {
        System.out.println("FILAAAAA: "+row);
        return playerMatrix[row];
    }
    
    public int getPieceCell(int row, int column) {
        return pieceMatrix[row][column];
    }
    
    public void setTrenAb(int row, int valor) {
        playerMatrix[row] = valor;
    }
    
    public void setPieceCell(int row, int column, int piece) {
        pieceMatrix[row][column] = piece;
    }
    
    public int[] getPlayerMatrix() {
        return playerMatrix;
    }
    
    public int[][] getPieceMatrix() {
        return pieceMatrix;
    }    
}